﻿/*************************************************************************
 *  Copyright (C), 2017-2018, YangTao tech. Co., Ltd.
 *  FileName: ClickClientButton.cs
 *  Author: YangTao   Version: 1.0   Date: 11/28/2016
 *  Email:YangTao_Unity3D@163.com
 *  Version Description:
 *    
 *  File Description:
 *    
 *  Class List:
 *    <ID>           <name>             <description>
 *     1.         ClickClientButton             
 *  Function List:
 *    <ID>           <name>             <description>
 *     1.
 *  History:
 *    <ID>    <author>      <time>      <version>      <description>
 *     1.     YangTao     11/28/2016       1.0        Build this file.
 *************************************************************************/
using UnityEngine;
using System.Collections;

public class ClickClientButton : MonoBehaviour
{
    public GameObject m_buttonBg;
    public bool m_isAdd;
    public UILabel m_clientIPLabel;

    void Start()
    {
        Init();
    }

    void Init()
    {               
        m_isAdd = false;
    }

    void Update()
    {
        
    }
    
    void OnClick()
    {
        if (!m_isAdd)
        {
            m_buttonBg.GetComponent<UISprite>().color = Color.red;
            m_isAdd = true;
        }
        else
        {
            m_buttonBg.GetComponent<UISprite>().color = Color.white;
            m_isAdd = false;
        }
        
    }
}